PROJECT(NeonMath)

ADD_DEFINITIONS(-DNEON_BUILD_DLL)

SET(Boost_USE_STATIC_LIBS ON)

FIND_PACKAGE(Qt4 REQUIRED)
FIND_PACKAGE(Boost 1.35.1)

INCLUDE(${QT_USE_FILE})
INCLUDE_DIRECTORIES(${NEONCORE_SOURCE_DIR})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
LINK_DIRECTORIES(${NEONCORE_BINARY_DIR})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})

SET(NEONENGINE_INCLUDE_DIR
    ../../includes
)

SET(NEONMATH_HDRS
	${NEONENGINE_INCLUDE_DIR}/NeonMath/Math.hpp
	${NEONENGINE_INCLUDE_DIR}/NeonMath/Matrix.hpp
    ${NEONENGINE_INCLUDE_DIR}/NeonMath/Vector2.hpp
	${NEONENGINE_INCLUDE_DIR}/NeonMath/Vector3.hpp
	${NEONENGINE_INCLUDE_DIR}/NeonMath/Vector4.hpp
)

SET(NEONMATH_SRCS
	Math.cpp
	Matrix.cpp
    Vector2.cpp
    Vector3.cpp
    Vector4.cpp
)

SET(NEONMATH_PUBLIC_INCLUDE_DIRS
)

SET(NEONMATH_LIBRARY
    neonmath
)

SET(NEONMATH_LINK_LIBRARIES
    ${NEONMATH_LIBRARY}
    ${QT_LIBRARIES}
    ${Boost_LIBRARIES}
    neoncore
)

ADD_LIBRARY(${NEONMATH_LIBRARY} SHARED ${NEONMATH_HDRS} ${NEONMATH_SRCS})

TARGET_LINK_LIBRARIES(${NEONMATH_LINK_LIBRARIES})

INSTALL(
    TARGETS
      ${NEONMATH_LIBRARY}
    DESTINATION
      ${NEONENGINE_INSTALL_DIR}/${APPLICATION_NAME}/lib
)